package pta;/**
 * @author： li
 * @date： 2022-03-28 17:33
 * @version 1.0
 */

import java.util.*;
public class 连续因子_不周全 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Set<Long> set = new TreeSet<>();
        long a = sc.nextLong();
        for(long i=2;i<=Math.sqrt(a)+1;i++){
            if(a%i==0){
                set.add(i);
                set.add(a/i);
            }
        }
        System.out.println(set.toString());
        Long[] res = new Long[set.size()];
        int u=0;
        for(Long i:set){
            res[u]=i;
            u++;
        }
        System.out.println(Arrays.toString(res));
        if(set.size()==0){
            System.out.println(1);
            System.out.println(a);
        }
        else {
        int l=0,r=0;
        long max=1;
        for(;r<res.length;r++){
            max*=res[r];
            while(max>a){
            max/=res[l];
            l++;
            }
            if(max==a)
                break;
        }
            System.out.println(l+" "+r);
        Long[] lx =Arrays.copyOfRange(res,l,r+1);
            System.out.println(Arrays.toString(lx));
        int ll=0,rr=0;
        for(;rr<(lx.length-1);rr++){
            if(lx[rr+1]-lx[rr]==1&&ll+1<=lx.length-1)
                rr++;
            else{
                ll++;
                rr++;
            }
        }
        for(int i=ll;i<rr;i++){
            System.out.print(lx[i]);
            if(i<=rr-2)
                System.out.print("*");
        }
//        System.out.println(ll+" "+(rr-1));
        }
    }
}
